package cn.lyq.card.ui.agent

import cn.lyq.card.base.SimpleVM


class AgentListVM : SimpleVM() {

    val pageSize = 20
    var type = 0

    fun getData(page: Int, key: String, date: String) = simpleEmit {
        repository.achievementService.getAgentList(type + 1, date, page, pageSize, key)
    }

    fun getAgentDetail(agentId: Int) = simpleEmit {
        repository.achievementService.getAgentDetail(agentId)
    }

    fun getAgentBuy(page: Int, key: String, date: String) = simpleEmit {
        repository.achievementService.getAgentBuy(type + 1, date, page, pageSize, key)
    }
}